home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-02-01 | 3.5 KB | 92 lines | [TEXT/CWIE] |
- //•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- // YELLOW EXTENSION TOOLKIT
- // File Name: YE proto.h
- // © 1998-2000 by Rocco Moliterno-Yellowsoft. All Right Reserved
- //•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
-
- #pragma once
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #define kYellowExtensionType 'ExRo'
- #define kYellowExtensionCreator '/RoW'
- #define kYellowCodeResTypePPC 'YeEx'
- #define kYellowCodeResType68k 'Ye68'
- #define kYellowCodeResID 128
-
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- //Put here the signature of your application
- enum{
- yellowSignature = FOUR_CHAR_CODE('yllw'),
- substituteSignature = FOUR_CHAR_CODE('sbst')
- };
-
- typedef FourCharCode YESignature;
-
- //If you don't use WASTE leave untouched the declaration of below.
- //If you use WASTE, instead, comment it then include "WASTE.h" to file "YE main.c"
- typedef struct OpaqueWEReference *WEReference;
-
- struct YEBlockRec{
- YESignature signature; // <--> Sanity: the signature of calling application.
- // The extension should also set this field with the signature
- // of supported application!
-
- WEReference sWaste; // --> from caller.It contains also a pointer to the related
- // window you may retrieve it through WEGetInfo call.
- TEHandle sText; // --> from caller
- ListRef sList; // --> from caller
- AliasHandle sFile; // --> from caller
-
- //The following parameters are returned by extension
- Boolean rNew; // <-- asks the calling application to create a new instance
- // in order to use following parameters.
- Handle rText; // <-- this handle may contain a TEXT.
-
- Handle rStyles; // <-- this handle may contain a style.
-
- Handle rSoup; // <-- this handle may contain a SOUP.
- // SOUPs are WASTE-related resources containing object as:
- // PICTs, sounds, movies and more.
-
- ListRef rList; // <-- this handle may contain a *NEW* List
-
- AliasHandle rFile; // <-- this handle may contain a *NEW* AliasHandle
- };
- typedef struct YEBlockRec YEBlockRec,*YEBlockPtr,**YEBlockHandle;
-
- //------------------------NOTE
- // YellowEdit (http://users.iol.it/yellowsoft/yellow.hyml) treats returned parameters, if valids,
- // as follows:
- // rNew = create a new window.
- // rList = will be disposed.
- // rText = will be inserted with rStyles and rSoup.
- // rStyles = if rText isn't valid will be used to replace the current style.
- // rSoup = if rText isn't valid will be used to replace the current SOUP.
- // rFile = try to read it.
- //----------------------------------------------------------------------------
- // Remember, your extension may perform what you want, so, if your extension doesn't
- // cooperate directly with YellowEdit (or with whatever application calls it) but performs
- // some its own work, you may completely ignore any field of above! Anyway,
- // in this case, would be better changing the signature field: if you set it, in example,
- // as '????', then YellowEdit neither try to analyze the returned data.
-
- enum {
- uppYellowEntryProcInfo = kPascalStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(YEBlockPtr)))
- };
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-